package com.auto.sns.core.dao.impl;

import java.util.List;
import java.util.Map;

import com.system.common.Page;
import com.auto.sns.core.domain.SnsCoreTask;
import com.auto.sns.core.dao.ISnsCoreTaskDAO;
import com.system.util.PersistUtil;
import com.auto.sns.core.sql.sqlid.SnsCoreTaskSqlID;
/**
 * : t_auto_sns_core_task
 * 
 * 
 * @author Gen
 */
public class SnsCoreTaskDAOImpl implements ISnsCoreTaskDAO{

	public SnsCoreTask insertSnsCoreTask(SnsCoreTask bean){
		return PersistUtil.insert(bean, SnsCoreTaskSqlID.INSERT);
	}

	public boolean deleteSnsCoreTask(String sctaGuid){
		PersistUtil.delete(sctaGuid, SnsCoreTaskSqlID.DELETE);
		return true;
	}	

	public SnsCoreTask updateSnsCoreTask(SnsCoreTask bean){
		return PersistUtil.update(bean, SnsCoreTaskSqlID.UPDATE);
	}	

	public SnsCoreTask loadSnsCoreTask(String sctaGuid){
		return PersistUtil.query(new SnsCoreTask().getClass(), sctaGuid);
	}

	public List<SnsCoreTask> queryList(Map<String,Object> param,Page page){
		page.setCount(PersistUtil.countSpecial(param, SnsCoreTaskSqlID.QUERY));
		return PersistUtil.querySpecial(param, SnsCoreTaskSqlID.QUERY, page.getFullOrderBy(), page.getOffset(), page.getLimit());
	}

}
